#pragma once
#include "Actor.h"
#include "ParticleEmitterFactory.h"
namespace mini
{
	class CParticleEmitter : public CActor
	{
		friend class CParticleRenderer;
	public:
		CParticleEmitter();
		virtual ~CParticleEmitter();
		void setEmitterType(CParticleEmitterType* pType);
		void initEmitterType(const std::string& szName );

	protected:
		virtual void update(float fDeltaTime);
		void eEmitter(float fDeltaTime);

	private:
		float mFrequency = 1.0f;
		int mParticlesMaxCount = 400;
		CPoint3F mRange = {1,1,1};
		std::vector<VertexVTC> mParticelsContent;
		std::list<ParticleCell*>* mParticles = nullptr;
		CParticleEmitterType* mpParticleEmitterType = nullptr;
	};
}